﻿#ifndef _CELL_SELECT_SERVER_H_
#define _CELL_SELECT_SERVER_H_

#include "CELLServer.h"

class CELLSelectServer : public CELLServer
{
public:
	CELLSelectServer();

	virtual ~CELLSelectServer();

	virtual bool DoNetEvents() override;

	// 处理DoNetEvents函数返回后的客户端发送的消息
	void ReadData();

	// 处理DoNetEvents函数返回后的可写的客户端
	void WriteData();
private:
	// 备份客户端集合
	fd_set _fdRead_bak;
	// 读集合
	fd_set _fdRead;
	// 写集合
	fd_set _fdWrite;
	// 用于select函数参数的当前最大套接字
	SOCKET _maxSock = 0;
};

#endif // #ifndef _CELL_SELECT_SERVER_H_
